# from app import celery
from celery_task.celery_init import celery
from insects_detection.pic_utils import pic_tools
import json

@celery.task(bind=True,name="celery_task.getchas")
def get_insects_chas(self,processed_gallery_path,chas_data_path):
    pic_tools.extract_all_imgs_characteristcs(processed_gallery_path,chas_data_path,True,self)
    return {'current': 100, 'total': 100, 'status': 'Task completed!',
            'result': 'Succeed in extracting all chas of processed images!'}